﻿<UserControl x:Class="Framework.UI.TestHarness.Views.TextView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:params="http://schemas.codeplex.com/elysium/params"
             xmlns:extra="http://schemas.extra.com/ui"
             mc:Ignorable="d" 
             d:DesignHeight="768" d:DesignWidth="1024">
    <ScrollViewer>
        <StackPanel>
        
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource HeaderTextStyle}"
                       Text="Text Styles (Type Ramp)"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource NormalTextStyle}" 
                       Text="Every time you use a TextBlock you should apply one of the following styles. Font and Font Size are dynamically controlled. We should be able to change these at runtime."/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource HeaderTextStyle}" 
                       Text="HeaderTextStyle"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource NormalTextStyle}" 
                       Text="NormalTextStyle"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource BoldTextStyle}" 
                       Text="BoldTextStyle"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource AccentTextStyle}" 
                       Text="AccentTextStyle"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource ContrastTextStyle}" 
                       Text="ContrastTextStyle"/>
        
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource HeaderTextStyle}"
                       Text="TextBlock vs Label"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource NormalTextStyle}" 
                       Text="When you want to display text by itself use the TextBlock because its fast. When you want to associate text with another control for keyboard shortcuts use the Label control. See the example below:"/>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Label Content="Label"
                       Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Target="{Binding ElementName=LabelTextBox}"/>
                <TextBox x:Name="LabelTextBox" 
                         Grid.Column="1"
                         Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"/>
            </Grid>
            
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource HeaderTextStyle}"
                       Text="Text Style Hierarchy"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource NormalTextStyle}" 
                       Text="The following hierarchy of text styles go very well together:"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource HeaderTextStyle}" 
                       Text="HeaderTextStyle"/>
            <TextBlock Margin="{Binding Converter={StaticResource DoubleToThicknessConverter}, ConverterParameter='Left, Right', RelativeSource={RelativeSource Self}, Path=(params:General.BoldPaddingValue), Mode=OneWay}"
                       Style="{StaticResource AccentTextStyle}" 
                       Text="AccentTextStyle"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource ContrastTextStyle}" 
                       Text="ContrastTextStyle"/>

            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource HeaderTextStyle}"
                       Text="Hyperlink"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource NormalTextStyle}" 
                       Text="TODO: Figure out why the Hyperlink is not picking up the Accent Brush as a foreground when IsMouseOver=True"/>
            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource NormalTextStyle}">
                <Hyperlink>Hyperlink</Hyperlink>
            </TextBlock>
        </StackPanel>
    </ScrollViewer>
</UserControl>
